//
//  UIImage+Category.h
//  chat
//
//  Created by yinxiufeng on 15/5/23.
//  Copyright (c) 2015年 yinxiufeng. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage (Category)


+(instancetype)stretchableImage:(NSString *)imageName;

//创建纯色图片
+(UIImage *)createImageWithColor:(UIColor *)color size:(CGSize)size;

// 将View转换成图片
+ (UIImage*)convertViewToImage:(UIView*)view;

+ (UIImage *)imageForView:(UIView *)view;

+ (UIImage *)scaleToSize:(UIImage *)img size:(CGSize)size;

//创建渐变色图片
+ (UIImage *)createGradientImageFromColors:(NSArray *)colors gradientLocations:(NSArray *)locations size:(CGSize)size;
+ (UIImage *)createGradientImageFromColors:(NSArray *)colors startPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint imageSize:(CGSize)size opaque:(BOOL)opaque;


- (UIImage *) imageWithTintColor:(UIColor *)tintColor;


@end
